package com.wanglei.controller;

import com.wanglei.domain.ResponseResult;
import com.wanglei.domain.dto.TagListDto;
import com.wanglei.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/content/tag")
public class TagController {

    @Autowired
    private TagService tagService;

    @GetMapping("/list")
    public ResponseResult list(Integer pageNum ,Integer pageSize,String name){
        return tagService.list(pageNum,pageSize,name);
    }

    @PostMapping
    public ResponseResult addTag(@RequestBody TagListDto tagListDto){
        return tagService.addTag(tagListDto);
    }
}
